package com.sicent.app0013.operate.data;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.sicent.app0013.operate.model.BarComment;
import com.sicent.app0013.operate.model.BarEarningData;
import com.sicent.app0013.operate.model.InternetBar;
import com.sicent.app0013.operate.service.BarCommentService;
import com.sicent.app0013.operate.service.BarEarningDataService;
import com.sicent.app0013.operate.service.InternetBarService;
import com.sicent.operate.common.db.model.User;
import com.sicent.operate.common.db.service.UserService;

@Component
public class InternetBarData {

	@Autowired
	private InternetBarService internetBarService;
	
	@Autowired
	private BarCommentService barCommentService;
	
	@Autowired
	private UserService userService;
	
	@Autowired
	private BarEarningDataService barEarningDataService;
	
	public List<InternetBar> findByInfo(Map<String, Object> param,
			Integer pageNo, Integer pageSize) {
		return internetBarService.findByInfo(param,pageNo,pageSize);
	}
	
	public BarComment getById(Integer commentId){
		return barCommentService.getById(commentId);
	}
	
	public User findByUserId(Integer userId){
		return userService.findUserById(userId);
	}
	
	public BarEarningData findById(Integer id){
		return barEarningDataService.findById(id);
	}
}
